<#import "../shared/spring.ftl" as spring />
<#import "../shared/form.ftl" as form />

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="${baseUrlStatic}/common/style/bootstrap.min.css" />
    <script type="text/javascript" src="${baseUrlStatic}/common/script/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="${baseUrlStatic}/common/script/bootstrap.min.js"></script>
</head>
<body>
    <form action="${baseUrlRoot}/test/add" method="post">
        <table>
            <tr>
                <td>Name</td>
                <td><input type="text" name="name" value="${(test??) ? string(test.name!"", "")}" /></td>
                <td>
                <#if test??>
                    <@spring.bind "test.name" />
                    <@spring.showErrors "" />
                </#if>
                </td>
            </tr>
            <tr>
                <td>Value</td>
                <td><input type="text" name="value" value="${(test??) ? string(test.value!"", "")}" /></td>
                <td>
                <#if test??>
                    <@spring.bind "test.value" />
                    <@spring.showErrors "" />
                </#if>
                </td>
            </tr>
            <tr>
                <td>Status</td>
                <td>
                    <@form.select name="status" items=statusList />
                </td>
                <td>
                <#if test??>
                    <@spring.bind "test.status" />
                    <@spring.showErrors "" />
                </#if>
                </td>
            </tr>
            <tr>
                <td>
                    <input type="submit" value="Submit" />

                </td>
                <td>
                    <a href="${baseUrlRoot}/test">Back</a>
                </td>
                <td>
                    <#if listError??>
                    <ul>
                    <#list listError as error>
                    <li>${error}</li>
                    </#list>
                    </ul>
                    </#if>
                    ${message!""}
                </td>
            </tr>
        </table>


    </form>
</body>
</html>